import {
  ForbiddenException,
  HttpException,
  HttpStatus,
  Injectable,
} from '@nestjs/common';
import { CreateCatDto } from './dto/create-cat.dto';
import { UpdateCatDto } from './dto/update-cat.dto';

@Injectable()
export class CatService {
  create(createCatDto: CreateCatDto) {
    // try {
    //   console.log(createCatDto, 'createCatDto');
    //   const s = null;
    //   console.log(s.length);
    // } catch (error) {
    //   console.dir(error);
    //   throw new ForbiddenException('Something bad happened', {
    //     cause: new Error(),
    //     description: 'Some error description',
    //   });
    // }
    return 'This action adds a new cat';
  }

  findAll() {
    return `This action returns all cat`;
  }

  findOne(id: number) {
    return `This action returns a #${id} cat`;
  }

  update(id: number, updateCatDto: UpdateCatDto) {
    return `This action updates a #${id} cat`;
  }

  remove(id: number) {
    return `This action removes a #${id} cat`;
  }
}
